<template>
  <el-dialog
    width="75%"
    :title=" '详情页'"
    :close-on-click-modal="false"
    :visible.sync="visible"

  >
    <div style="height: 400px" >
      <!--表格渲染-->
      <el-table :data="dataList" size="small" border style="text-align-all: center" :header-cell-style="{background:'#EAE9E9FF'}">
        <!--      <el-table-column type="selection" width="50px"/>-->
        <el-table-column prop="uid" label="用户id" width="70%"/>
        <el-table-column prop="extractName" label="提现用户" width="90%"/>
        <el-table-column prop="realName" label="真实姓名" width="90%"/>
        <el-table-column prop="bankName" label="银行名称"/>
        <el-table-column prop="bankAddress" label="开户行" width="180px"/>
        <el-table-column prop="bankCode" label="银行卡号" width="180px"/>
        <el-table-column prop="extractPrice" label="提现金额/(元)" width="100px"/>
        <el-table-column prop="applyTime" label="申请时间" width="150px"/>
        <el-table-column prop="extractType" label="提现方式" width="90%">
          <template slot-scope="scope">
            <div v-if="scope.row.extractType=== 0">银行卡</div>
            <div v-if="scope.row.extractType=== 2">微信</div>
            <div v-if="scope.row.extractType=== 1">支付宝</div>
          </template>
        </el-table-column>
        <el-table-column prop="remark" label="审核备注" width="80%"/>
        <el-table-column prop="examineTime" label="审核时间" width="150px"/>
        <el-table-column prop="status" label="审核状态" width="80px">
          <template slot-scope="scope">
            <div v-if="scope.row.status === 1" style="color: #13ce66;font-weight: bold">
              已通过
            </div>
            <div v-if="scope.row.status === -1" style="color: red;font-weight: bold">
              未通过
            </div>
            <div v-if="scope.row.status === 0" style="color: red;font-weight: bold">
              待审核
            </div>
          </template>
        </el-table-column>
      </el-table>
    </div>
  </el-dialog>
</template>

<script>
import { info } from '@/api/ums/userExtract'

export default {
  name: 'ShowExtractDetail',
  data() {
    return {
      visible: false,
      dataList: [],
      dataForm: {
        id: '',
        uid: '',
        username: '',
        realName: '',
        extractName: '',
        extractType: '',
        bankName: '',
        bankCode: '',
        bankAddress: '',
        extractPrice: '',
        failMsg: '',
        examineTime: '',
        applyTime: '',
        status: '',
        createTime: '',
        updateTime: '',
        remark: '',
        isDelete: ''
      }
    }
  },
  methods: {
    init(id) {
      this.dataForm.id = id || 0
      this.visible = true
      this.$nextTick(() => {
        if (this.dataForm.id) {
          info(this.dataForm.id).then(res => {
            this.dataList = [res.data]
          })
        }
      })
    }
  }
}
</script>

<style scoped>

</style>
